<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据类型</title>
</head>
<body>

<script>
    /*
        简单/基本数据类型：String(字符串),Boolean(布尔值),Number(数字型),Symbol(复数),Undefined(未定义),Null(空); 赋值
        复杂/引用数据类型：Array(数组),Data(数据),Regexp(正则)，Function(函数),Object(对象),赋址
    */
    let num = 10;
    let n;
    n= num;
    n= 12;
    console.log(n)//12
    console.log(num)//10

    let obj = {
        name:'张三'
    };
    let obj2 = {};
    obj2 = obj;
    //JSON.parse(JSON.stringify()); 会把对象深拷贝一份
    //深拷贝 是内容一样但地址不一样
    //浅拷贝 是内容和地址都一样完全一样
    //JSON.parse(JSON.stringify(obj));
    obj2.name = 'yateng';
    console.log(obj,'obj')
    console.log(obj2,'obj2')
    console.log(obj2 ===obj)
</script>


</body>
</html>